import datetime
import PyQt5.QtCore
import mysql.connector
# User_Name="1"
# myselect_Toy="select 标准价格,损旧等级 from 玩具个体表 where 玩具编号= "+'1'
# myselect_FK="select 罚款基数 from 罚款表 where 罚款种类号= "+'1'
# mydb = mysql.connector.connect(host="localhost", port=3306, user='1', passwd="123", database="test")
mydb = mysql.connector.connect(host="localhost", port=3306, user='Manager', passwd="123", database="test")
# myselect= "SELECT * FROM 玩具种类表"
# mycursor = mydb.cursor()
# data=(1,1,1,70.0,"2021-07-04")
# mycursor.execute(myselect)
# result=mycursor.fetchall()
# print(result)
# s="2020-10-26"
# a=PyQt5.QtCore.QDate(*map(int, s.split('-')))
# b=datetime.date(*map(int, s.split('-')))
# b=b+datetime.timedelta(days=20)
# a=a.addDays(20)
# print(str(a))
mycusor = mydb.cursor()
mycusor.execute("insert into 出租信息表 value(4,1,1,0,10,'2019-07-08','2019-08-09','否')")
mydb.commit()

